var fs=require("fs");
//创建一个可读流
var readerStream=fs.createReadStream("index.txt");

//创建一个可写流
var writeStream=fs.createStream=fs.createWriteStream('output.txt');

//管道读写操作
//读写input.txt文件内容将内容写到output.txt中
readerStream.pipe(writeStream);

console.log("程序执行完毕");